﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Root.cshtml";
}
<script type="text/javascript">
    $(function () {

        $.ajax({
            type: 'POST',
            contentType: "application/json",
            url: "/TestChat",
            data: "{ 'param':'1'}",
            success: function (d) {
                $.each(d, function (i,item) { // First Level
                    $("#list").append('<b>' + item.QContent + '</b><br/>');
                    $.each(item.AList, function (j,item1) {  // The contents inside stars
                        $("#list").append(item1.AContent+','+item1.Qid+'==');
                    });
                });
            },
            error: function (e, d) {
            },
            dataType: "json"
        });



        // Next
       
    });
    
</script>
<h2>Test chat</h2>
<ul id="list">
    
</ul>
<div class="input-question">
        <textarea id="questioncontent" placeholder="Nhập câu hỏi..."></textarea>
        <input type="button" class="btn" id="sendquestion" value="Gửi" />
    </div>
